/*
package cloud.xlh.my_system.middle_aware.mq.rabbitmq;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

import static cloud.xlh.my_system.middle_aware.mq.rabbitmq.RabbitMQConfig.DEAD_LETTER_QUEUEA_NAME;
import static cloud.xlh.my_system.middle_aware.mq.rabbitmq.RabbitMQConfig.DEAD_LETTER_QUEUEB_NAME;

*/
/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/7/1 12:01
 * @ Description:
 *//*

@Component
public class DeadLetterMessageReceiver {


    @RabbitListener(queues = DEAD_LETTER_QUEUEA_NAME)
    public void receiveA(Message message, Channel channel) throws IOException, InterruptedException {
        System.out.println("收到死信消息A：" + new String(message.getBody()));
        Thread.sleep(3000);
        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
    }

    @RabbitListener(queues = DEAD_LETTER_QUEUEB_NAME)
    public void receiveB(Message message, Channel channel) throws IOException, InterruptedException {
        System.out.println("收到死信消息B：" + new String(message.getBody()));
        Thread.sleep(3000);
        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
    }
}
*/
